export enum TradeType {
  BUY = 'BUY',
  SELL = 'SELL',
}

export const TradeTypeMap = {
  [TradeType.BUY]: '求购',
  [TradeType.SELL]: '出售',
}

export const TradeTypeList = [{
  label: TradeTypeMap[TradeType.BUY],
  value: TradeType.BUY,
}, {
  label: TradeTypeMap[TradeType.SELL],
  value: TradeType.SELL,
}];

export enum TradeInfoType {
  SUIT = 'SUIT',
  DECK = 'DECK',
  CARD = 'CARD',
  OTHER = 'OTHER',
}

export const TradeInfoTypeMap = {
  [TradeInfoType.SUIT]: '大套',
  [TradeInfoType.DECK]: '卡组',
  [TradeInfoType.CARD]: '单卡',
  [TradeInfoType.OTHER]: '其他',
}

export const TradeInfoTypeList = [{
  label: TradeInfoTypeMap[TradeInfoType.SUIT],
  value: TradeInfoType.SUIT,
}, {
  label: TradeInfoTypeMap[TradeInfoType.DECK],
  value: TradeInfoType.DECK,
}, {
  label: TradeInfoTypeMap[TradeInfoType.CARD],
  value: TradeInfoType.CARD,
}, {
  label: TradeInfoTypeMap[TradeInfoType.OTHER],
  value: TradeInfoType.OTHER,
}];

export class UaTradeEntity {
  id?: number;
  ipId?: number;
  userId?: number;
  price?: number;
  link?: string;
  tradeType?: TradeType;
  tradeInfoType?: TradeInfoType;
  description?: string;
  updateDate?: Date;
  updateDateStr?: string;
  hot?: number;
}


export class UaTradeSearchDto {
  ipId?: number;
  userId?: number;
  tradeType?: TradeType;
  tradeInfoType?: TradeInfoType;
  description?: string;
}

